public with sharing class AutoCompleteController {

    public AutoCompleteController(ApexPages.StandardController controller) {

    }


    public String jsonString {
    get
    {
    return prepareData();
    }
    
    }
    
      
    //Temp Method to prepare the Data
    private String prepareData()
    {
        List<Account> a = new List<Account>([select id,name from Account]);
        String astr = '[';
        for(Integer i=0; i<a.size(); i++){
            if(i>0) astr += ',';
            astr += '\"'+a[i].name+'\"';
        }
        astr += ']';
        return astr;
        
        
   } 
        
        
}